//
//  MFWUserLoginManager.h
//  MFWSdk
//
//  Created by Song Xiaofeng on 13-8-6.
//  Copyright (c) 2013年 Mafengwo Inc. All rights reserved.
//

#import <Foundation/Foundation.h>

extern NSString *const kMFWLoginError_Str_Msg;
extern NSString *const kMFWLoginError_Domain;

@interface MFWUserLoginManager : NSObject
{
    
}
//@property
+ (MFWUserLoginManager *)sharedInstance;

- (void)logout;

- (BOOL)loginWithMFWUserName:(NSString*)username password:(NSString*)password finisheHandler:(UserLoginFinished)handler;

- (BOOL)registerWithMFWUserName:(NSString*)username password:(NSString*)password nickName:(NSString*)nickName finisheHandler:(UserRegisterFinished)handler;

/*
 OID项目
 */
- (BOOL)registerWithOIDUserName:(NSString*)username password:(NSString*)password email:(NSString *)email finisheHandler:(UserRegisterFinished)handler;

- (BOOL)loginWithOIDUserName:(NSString*)username password:(NSString*)password finisheHandler:(UserLoginFinished)handler;

/** 第三方登录 */
- (BOOL)do3rdLoginWithUid:(NSString*)userid
type:(NSString*)type
name:(NSString*)name
header:(NSString*)header
location:(NSString*)location
gender:(NSString*)gender
unionId:(NSString*)unionId
finishHandler:(UserLoginFinished) handler;

- (BOOL)loginWithThirdParty:(MFWShareType)shareType startBind:(void(^)())startBindBlock finisheHandler:(UserLoginFinished)handler;

//- (BOOL)refreshDefaultUserInfo;

+ (void)setThirdPartBindingNavigationConfigBlock:(void(^)(UINavigationController *navigationController)) block;
@end
